Skip to content

impl(rest): use PQC algorithm when available#16253

Open
scotthart wants to merge 2 commits into
googleapis:mainfrom
scotthart:rest_pqc_curves_2
Open

impl(rest): use PQC algorithm when available#16253
scotthart wants to merge 2 commits into
googleapis:mainfrom
scotthart:rest_pqc_curves_2

Conversation

@scotthart

@scotthart scotthart commented Jul 13, 2026

Copy link
Copy Markdown
Member

This PR queries the underlying crypto library and configures libcurl to use a hybrid MLKEM algorithm if available. It also includes other non-PQC algorithms as a fallback in case the server does not support the same algorithm as the client.

This PR also introduces a new showcase build that spins up a gapic-showcase server to verify the hybrid MLKEM algorithm is being used.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for Post-Quantum Cryptography (PQC) curves (specifically X25519MLKEM768) in the REST transport client by configuring CURLOPT_SSL_EC_CURVES in libcurl when supported. It adds platform-specific implementations to query available crypto groups on OpenSSL and Windows, along with integration tests to verify PQC negotiation. The review feedback identifies a critical buffer overflow in the Windows implementation of AvailableCryptoGroups, a potential null pointer dereference in the OpenSSL implementation, a missing <algorithm> header, and opportunities to optimize string copies and use more idiomatic move semantics.

Comment thread google/cloud/internal/win32/ssl_ec_curves.cc Outdated
Comment thread google/cloud/internal/openssl/ssl_ec_curves.cc
Comment thread google/cloud/internal/openssl/ssl_ec_curves.cc Outdated
Comment thread google/cloud/internal/openssl/ssl_ec_curves.cc Outdated
Comment thread google/cloud/internal/curl_rest_client.cc
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.77419% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.27%. Comparing base (e493b2d) to head (87b67bd).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
google/cloud/internal/curl_rest_client.cc 71.42% 2 Missing ⚠️
google/cloud/internal/ssl_ec_curves_test.cc 96.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16253      +/-   ##
==========================================
- Coverage   92.27%   92.27%   -0.01%     
==========================================
  Files        2214     2217       +3     
  Lines      206505   206596      +91     
==========================================
+ Hits       190556   190633      +77     
- Misses      15949    15963      +14     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@scotthart scotthart force-pushed the rest_pqc_curves_2 branch from dd1b155 to 87b67bd Compare July 15, 2026 18:44
@scotthart scotthart marked this pull request as ready for review July 15, 2026 19:17
@scotthart scotthart requested a review from a team as a code owner July 15, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant